*ssc install unique
*ssc install estout
*ssc install reghdfe


clear all
set more off
******************************
*** SET  PREFERENCES ***
******************************
	
	*** Mauricio's laptop
	if "`c(username)'" == "Mauricio"  {
		global mipath 	  "C:/Users/Mauricio/Dropbox/Research/Management and learning/"
	}
	*** Mauricio's desktop
	if "`c(username)'" == "mauricio"  {
		global mipath 	  "C:/Users/mauricio/Dropbox/Research/Management and learning/"
	}
	
		*** Mauricio's ITAM desktop
	if "`c(username)'" == "MROMEROLO"  {
		global mipath 	  "D:/Dropbox/Research/Management and learning/"
	}
	
		*** Mauricio's Yoga
	if "`c(username)'" == "mauri"  {
		global mipath 	 "C:/Users/mauri/Dropbox/Research/Management and learning/"
	}
	*** Juan's computer
	if "`c(username)'" == "Juan"  {
		global mipath 	  "C:/Users/Juan/Dropbox/Management and learning/"
	}

	*** Karina's Laptop
	if "`c(username)'" == "Escuela"  {
		global mipath 	  "/Users/Escuela/Dropbox/Management and learning"
	}
	
	

*** Path tree
	global dir_do     "$mipath/Codigos/ManagementCode"
	global tables     "$mipath/LatexManagement/tables"
	global graphs     "$mipath/LatexManagement/figures"
	global basein 	  "$mipath/Datos/RawData"
	global base_out   "$mipath/Datos/CreatedDataManagement"

****Tables programs
do "$dir_do/XX_TablesPrograms.do"
	*exit
*** Globals controls and outcomes


*****************
*** Actual do ***
**************+**

*** Códigos ***
exit
	*Data cleaning
	do "$dir_do/01a_DWMS.do"
	do "$dir_do/01b_Planea2015.do"
	do "$dir_do/01c_Planea2018.do"
	do "$dir_do/01d_BalancesBases.do"
	do "$dir_do/01e_911_allD.do"
	
	
	*Basic analysis
	do "$dir_do/02a_RegsDWMS.do"
	do "$dir_do/02b_RegsPlanea2018.do"
	do "$dir_do/02c_RegsPlanea2018_Robust.do"
	do "$dir_do/03b_BalanceTables_General.do"
	do "$dir_do/03c_TablesPvsNP.do"
	
	*Compliance
	do "$dir_do/04a_ComplianceStallings.do"
	do "$dir_do/04b_ComplianceSisat.do"
	
	*Baseline management/learning correlation
	do "$dir_do/05_Management&Learning_2015.do"
	
	
	*Analyze the valora data for mechanisims
	do "$dir_do/06a_Tabla_valora.do"
	do "$dir_do/06b_RegsValora.do"
	
	
	*Valora balance
	do "$dir_do/07_Balance_valora.do"
	
	*Other outcomes
	do "$dir_do/08_efectos_otros_outcomes.do"
	
	*Heterogeoeneity
	do "$dir_do/09_RegHeterogeneos.do"
	
	*IV
	do "$dir_do/10_IV_Results.do"

	*results from PLANEA contexto
	do "$dir_do/11_ContextoDirectores.do"
	*COMPARING DISTRIBUTION IN OTHER COUNTRIES TO THAT OF MEXICO
	do "$dir_do/12_ComparisonBloom.do"
	*EFFECT OF ATTENDANCE ON TREATMENT EFFECTS
	do "$dir_do/13_Propensity_PlaneaContexto.do"
	do "$dir_do/13_Propensity_Valora.do"
	**PRINCIPAL TURNOVER
	do "$dir_do/14_Director_turnover.do"
	
	
	
	exit  



